package com.yuyou.tas.lesson.service;


import com.yuyou.tas.service.api.lesson.dto.DtoBaseSchool;
import com.yuyou.tas.service.api.lesson.entity.BaseSchool;
import com.yuyou.tas.util.bean.LoginRedisObj;
import com.yuyou.tas.util.bean.Pagination;
import com.yuyou.tas.util.bean.ResBoolSimpleInfo;

import java.util.List;

public interface IBaseSchoolService {

    int deleteByPrimaryKey(Long id);
    int insert(BaseSchool record);
    BaseSchool selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(BaseSchool record);
	
    ResBoolSimpleInfo addSchool(String schoolName , LoginRedisObj user,Long organId);
    ResBoolSimpleInfo updateSchool(String schoolName ,Long id);
    ResBoolSimpleInfo delSchool(Long id)throws Exception;
    ResBoolSimpleInfo<BaseSchool> getSchoolByID(Long id);

    int findSchoolCount(Pagination<DtoBaseSchool> queryPgn);
    List<DtoBaseSchool> findSchoolPageList(Pagination<DtoBaseSchool> queryPgn);

    BaseSchool selectByPKandOrgan(Long id, Long authOrganizationId);

    BaseSchool selectByOrgan7OId(Long oId, Long authOrganizationId);
    
    ResBoolSimpleInfo<String> syncSchool(List<BaseSchool> baseSchool );
    
    ResBoolSimpleInfo<String> delSchoolByOrgan7OIds(List<Long> oIds,Long authOrganizationId);

    int findTeacherSchoolCount(Pagination<DtoBaseSchool> queryPgn);
    List<DtoBaseSchool> findTeacherSchoolPageList(Pagination<DtoBaseSchool> queryPgn);


    List<BaseSchool> getByOrganId(Long organId);

    List<DtoBaseSchool> selectByLimits(Pagination<DtoBaseSchool> queryPgn);

    Integer selectByLimitsCount(Pagination<DtoBaseSchool> queryPgn);


    List<DtoBaseSchool> getUsersAllSchools(Integer tag , Long userId , Long organId , Integer userType , boolean isManager);


    List<DtoBaseSchool> selectAllByLimits(Long userId);

    List<DtoBaseSchool> findTeacherSchools(Long userId);
    
}